{% extends 'base.html' %}
{% load i18n %}

{% block title %}{% trans '探针' %}{% endblock %}

{% block body %}
<div style="display: flex">
    <div style="width: 20%">

        <div class="card" style="width: 18rem; margin-top: 20px; margin-left: 20px;">
            <div class="card-body">
                <h5 class="card-title">{% trans '探针' %}：{{ probe.probe_name }}</h5>
                <p class="card-text">{% trans '版本号' %}：{{ probe.version }}</p>
                <p class="card-text">{% trans '更新时间' %}：{{ web_task.0.creation}}</p>
            </div>

        </div>

{#        <div class="card" style="width: 18rem; margin-top: 20px; margin-left: 20px;">#}
{##}
{#            <div class="card-body">#}
{#                <h5 class="card-title">监控总量</h5>#}
{#                <p class="card-text">xxx</p>#}
{#            </div>#}
{##}
{#        </div>#}
{##}
{#        <div class="card" style="width: 18rem; margin-top: 20px; margin-left: 20px;">#}
{##}
{#            <div class="card-body">#}
{#                <h5 class="card-title">HTTP总量/TCP总量</h5>#}
{#                <p class="card-text">xxx/xxx</p>#}
{#            </div>#}
{#        </div>#}
{##}
{#        <div class="card" style="width: 18rem; margin-top: 20px; margin-left: 20px;">#}
{##}
{#            <div class="card-body">#}
{#                <h5 class="card-title">HTTP总量/异常/正常</h5>#}
{#                <p class="card-text">xxx/xxx/xxx</p>#}
{#            </div>#}
{#        </div>#}
{##}
{#        <div class="card" style="width: 18rem; margin-top: 20px; margin-left: 20px;">#}
{##}
{#            <div class="card-body">#}
{#                <h5 class="card-title">TCP总量/异常/正常</h5>#}
{#                <p class="card-text">xxx/xxx/xxx</p>#}
{#            </div>#}
{#        </div>#}

    </div>

    <div style="width: 78%; margin-top: 20px; margin-left: 20px;">
        <table class="table">
            <thead>
            <tr>
                <th scope="col">#</th>
                <th scope="col">{% trans '网址' %}</th>
                <th scope="col">{% trans '网址hash值' %}</th>
{#                <th scope="col">时间</th>#}

{#                <th scope="col">总耗时</th>#}
{#                <th scope="col">DNS 解析时间</th>#}
{#                <th scope="col">TCP 建立持续时间</th>#}
{#                <th scope="col">tls 时间</th>#}
{#                <th scope="col">连接成功到收到内容时间</th>#}
{#                <th scope="col">响应内容时间</th>#}
            </tr>
            </thead>
            <tbody>
            {% for task in web_task %}
                <tr>

                    <th scope="row">{{ forloop.counter }}</th>
                    <td>{{ task.url }}</td>
                    <td>{{ task.url_hash }}</td>
{#                    <td>{{ task.creation }}</td>#}
{#                    <td>{{ task.status }}</td>#}
{#                    {% with total=task.resolve_time|floatformat:0|add:task.connect_time|floatformat:0 %}#}
{#                    <td>{{ total }}</td>#}
{#                    {% endwith %}#}
{#                    <td>{{ task.resolve_time }}</td>#}
{#                    <td>{{ task.connect_time }}</td>#}
{#                    <td>{{ task.tls_time }}</td>#}
{#                    <td>{{ task.processing_time }}</td>#}
{#                    <td>{{ task.transfer_time }}</td>#}

                </tr>
            {% endfor %}

            </tbody>
        </table>
    </div>

</div>
{% endblock %}
